import config from "@/config"
import http from "@/utils/request"

export default {
	dic: {
		tree: {
			url: `${config.API_URL}/dic/tree`,
			name: "获取字典树",
			get: async function(){
				return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/dic/list`,
			name: "字典分类",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		infoList: {
			url: `${config.API_URL}/dic/infoList`,
			name: "字典明细",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		get: {
			url: `${config.API_URL}/dic/get`,
			name: "获取字典数据",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/dic/edit`,
			name: "编辑",
			post: async function(data){
				return await http.post(this.url, data);
			}
		},
		del: {
			url: `${config.API_URL}/dic/del`,
			name: "删除",
			delete: async function(data){
				return await http.delete(this.url, data);
			}
		},
		infoEdit: {
			url: `${config.API_URL}/dic/infoEdit`,
			name: "编辑",
			post: async function(data){
				return await http.post(this.url, data);
			}
		},
		infDel: {
			url: `${config.API_URL}/dic/infoDel`,
			name: "删除",
			delete: async function(data){
				return await http.delete(this.url, data);
			}
		},
	},
	role: {
		list: {
			url: `${config.API_URL}/role/list`,
			name: "获取角色列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/role/edit`,
			name: "编辑角色",
			post: async function(data){
				return await http.post(this.url, data);
			}
		},
		del: {
			url: `${config.API_URL}/role/del`,
			name: "编辑角色",
			delete: async function(data){
				return await http.delete(this.url, data);
			}
		},
		//角色的
		link: {
			url: `${config.API_URL}/role/link`,
			name: "角色Link菜单",
			post: async function(data={}){
				return await http.post(this.url,data);
			}
		},

	},
	permission:{
		//角色的
		list: {
			url: `${config.API_URL}/permission/list`,
			name: "菜单资源",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		del: {
			url: `${config.API_URL}/permission/del`,
			name: "删除资源",
			delete: async function(params){
				return await http.delete(this.url,params);
			}
		},
		edit: {
			url: `${config.API_URL}/permission/edit`,
			name: "删除资源",
			post: async function(params){
				return await http.post(this.url,params);
			}
		},
	},
	id:{
		uuid:{
			url: `${config.API_URL}/tool/getUUId`,
			name: "菜单资源",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		snowId:{
			url: `${config.API_URL}/tool/getSnowId`,
			name: "菜单资源",
			get: async function(params){
				return await http.get(this.url,params);
			}
		}
	},
	dept: {
		list: {
			url: `${config.API_URL}/system/dept/list`,
			name: "获取部门列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	user: {
		list: {
			url: `${config.API_URL}/user/list`,
			name: "获取用户列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/user/edit`,
			name: "编辑用户",
			post: async function(params){
				return await http.post(this.url,params);
			}
		},
		del: {
			url: `${config.API_URL}/user/del`,
			name: "删除资源",
			delete: async function(params){
				return await http.delete(this.url,params);
			}
		},
	},
	app: {
		list: {
			url: `${config.API_URL}/system/app/list`,
			name: "应用列表",
			get: async function(){
				return await http.get(this.url);
			}
		}
	},
	log: {
		list: {
			url: `${config.API_URL}/system/log/list`,
			name: "日志列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	table: {
		list: {
			url: `${config.API_URL}/system/table/list`,
			name: "表格列管理列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		info: {
			url: `${config.API_URL}/system/table/info`,
			name: "表格列管理详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	tasks: {
		list: {
			url: `${config.API_URL}/system/tasks/list`,
			name: "系统任务管理",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	}
}
